package com.javaee.service.admin.impl;

import com.javaee.entity.Record;
import com.javaee.mapper.admin.RecordMapper;
import com.javaee.service.admin.RecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author mo
 * @since 2024-11-27
 */
@Service
public class RecordServiceImpl  implements RecordService {
    @Autowired
    private RecordMapper recordMapper;

    @Override
    public boolean deleteRecord(Integer id) {
        return recordMapper.deleteRecord(id);
    }

    @Override
    public void addRecord(Record record) {
        recordMapper.addRecord(record);
    }

    @Override
    public Record getRecordById(Integer id) {
        return recordMapper.getRecordById(id);
    }

    @Override
    public boolean updateRecord(Record record) {
        return recordMapper.updateRecord(record);
    }

    @Override
    public List<Record> searchRecord(String keyword, int pageNum, int pageSize) {
        return recordMapper.searchRecord(keyword,pageNum,pageSize);
    }

    @Override
    public List<Record> getRecordList() {
        return recordMapper.getRecordList();
    }

    @Override
    public int selectCount() {
        return recordMapper.selectCount();
    }
}
